<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <title>楼盘评分配置</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
        border: none;
    }
    .form-control{
        display: inline-block;
        width: 80%;
    }
    </style>

    <asset:stylesheet src="homer/vendor/ladda-themeless.min.css"/>
    <asset:javascript src="echarts/Chart.min.js"/>
    <asset:javascript src="homer/vendor/index.js"/>
    <asset:javascript src="homer/vendor/spin.min.js"/>
    <asset:javascript src="homer/vendor/ladda.min.js"/>
    <asset:javascript src="homer/vendor/ladda.jquery.min.js"/>
    <asset:javascript src="echarts/echarts-all-3.js" />



</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>押品</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                楼盘评分配置
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    %{--综合评分配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                综合评分配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <th class="text-center sortable"><h3 class="text-success">评分维度</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">当前权值</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">权值修改</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <input type="hidden" id="liquidityWeightHidden" value="<g:formatNumber number="${result.liquidityWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="assortWeightHidden" value="<g:formatNumber number="${result.assortWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <form id="form3">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr align="center">
                                        <td> 流通性评分</td>
                                        <td> <g:formatNumber number="${result.liquidityWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong3"  type="text" name="liquidityWeight" id="liquidityWeight" value="<g:formatNumber number="${result.liquidityWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 小区评分</td>
                                        <td> <g:formatNumber number="${result.assortWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong3" type="text" name="assortWeight" id="assortWeight" value="<g:formatNumber number="${result.assortWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 自然环境评分</td>
                                        <td> <g:formatNumber number="${result.natureWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong3" type="text" name="natureWeight" id="natureWeight" value="<g:formatNumber number="${result.natureWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>

                                </form>
                                <td align="right"><span style="color:red; display: none;" id="errMsg3"  >数字之和不是100</span></td>

                                </tbody>
                            </table>

                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub3" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault3" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>

                        </div>
                    </div>

                </div>

                <div class="col-md-6" >
                    %{--echarts--}%
                    <div id="main_3" style="width: 100%;height: 400px;"></div>
                    %{--<canvas id="doughnutChart" height="300" width="500"></canvas>--}%
                </div>
            </div>

        </div>
    </div>
    %{--流动性--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                流通性评分配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <th class="text-center sortable"><h3 class="text-success">评分维度</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">当前权值</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">权值修改</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <input type="hidden" id="closingWeightHidden" value="<g:formatNumber number="${result.closingWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="listingWeightHidden" value="<g:formatNumber number="${result.listingWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="dealAvgDayWeightHidden" value="<g:formatNumber number="${result.dealAvgDayWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="discountrateWeightHidden" value="<g:formatNumber number="${result.discountrateWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="foreclosureTimesWeightHidden" value="<g:formatNumber number="${result.foreclosureTimesWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <form id="form1">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr align="center">
                                        <td> 成交率</td>
                                        <td> <g:formatNumber number="${result.closingWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong1"  type="text" name="closingWeight" id="closingWeight" value="<g:formatNumber number="${result.closingWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 挂牌率</td>
                                        <td> <g:formatNumber number="${result.listingWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong1" type="text" name="listingWeight" id="listingWeight" value="<g:formatNumber number="${result.listingWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 成交周期</td>
                                        <td> <g:formatNumber number="${result.dealAvgDayWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong1" type="text" name="dealAvgDayWeight" id="dealAvgDayWeight" value="<g:formatNumber number="${result.dealAvgDayWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 折价比例</td>
                                        <td> <g:formatNumber number="${result.discountrateWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong1" type="text" name="discountrateWeight" id="discountrateWeight" value="<g:formatNumber number="${result.discountrateWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 法拍次数</td>
                                        <td> <g:formatNumber number="${result.foreclosureTimesWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong1" type="text" name="foreclosureTimesWeight" id="foreclosureTimesWeight" value="<g:formatNumber number="${result.foreclosureTimesWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                </form>
                                <td align="right"><span style="color:red; display: none;" id="errMsg1"  >数字之和不是100</span></td>

                                </tbody>
                            </table>

                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub1" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault1" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>

                        </div>
                    </div>

                </div>

                <div class="col-md-6" >
                    %{--echarts--}%
                    <div id="main_1" style="width: 100%;height: 400px;"></div>
                    %{--<canvas id="doughnutChart" height="300" width="500"></canvas>--}%
                </div>
            </div>

        </div>
    </div>
    %{--周边配套--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                小区评分配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <th class="text-center sortable"><h3 class="text-success">评分维度</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">当前权值</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">权值修改</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <input type="hidden" id="schoolDistrictsWeightHidden" value="<g:formatNumber number="${result.schoolDistrictsWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="trafficWeightHidden" value="<g:formatNumber number="${result.trafficWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="houseAgeWeightHidden" value="<g:formatNumber number="${result.houseAgeWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="hospitalWeightHidden" value="<g:formatNumber number="${result.hospitalWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="mallWeightHidden" value="<g:formatNumber number="${result.mallWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="afforestationWeightHidden" value="<g:formatNumber number="${result.afforestationWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="ratioWeightHidden" value="<g:formatNumber number="${result.ratioWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="parkWeightHidden" value="<g:formatNumber number="${result.parkWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="propertyFeeWeightHidden" value="<g:formatNumber number="${result.propertyFeeWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="superMarketWeightHidden" value="<g:formatNumber number="${result.superMarketWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <input type="hidden" id="bankWeightHidden" value="<g:formatNumber number="${result.bankWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" />
                                <form id="form2">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr align="center">
                                        <td> 学区</td>
                                        <td> <g:formatNumber number="${result.schoolDistrictsWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2"  type="text" name="schoolDistrictsWeight" id="schoolDistrictsWeight" value="<g:formatNumber number="${result.schoolDistrictsWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 交通</td>
                                        <td> <g:formatNumber number="${result.trafficWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="trafficWeight" id="trafficWeight" value="<g:formatNumber number="${result.trafficWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 房龄</td>
                                        <td> <g:formatNumber number="${result.houseAgeWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="houseAgeWeight" id="houseAgeWeight" value="<g:formatNumber number="${result.houseAgeWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 医院</td>
                                        <td> <g:formatNumber number="${result.hospitalWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="hospitalWeight" id="hospitalWeight" value="<g:formatNumber number="${result.hospitalWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 商场</td>
                                        <td> <g:formatNumber number="${result.mallWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="mallWeight" id="mallWeight" value="<g:formatNumber number="${result.mallWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 绿化率</td>
                                        <td> <g:formatNumber number="${result.afforestationWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2"  type="text" name="afforestationWeight" id="afforestationWeight" value="<g:formatNumber number="${result.afforestationWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 容积率</td>
                                        <td> <g:formatNumber number="${result.ratioWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="ratioWeight" id="ratioWeight" value="<g:formatNumber number="${result.ratioWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 公园</td>
                                        <td> <g:formatNumber number="${result.parkWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="parkWeight" id="parkWeight" value="<g:formatNumber number="${result.parkWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 物业费</td>
                                        <td> <g:formatNumber number="${result.propertyFeeWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="propertyFeeWeight" id="propertyFeeWeight" value="<g:formatNumber number="${result.propertyFeeWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 超市</td>
                                        <td> <g:formatNumber number="${result.superMarketWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="superMarketWeight" id="superMarketWeight" value="<g:formatNumber number="${result.superMarketWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 银行</td>
                                        <td> <g:formatNumber number="${result.bankWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong2" type="text" name="bankWeight" id="bankWeight" value="<g:formatNumber number="${result.bankWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                </form>
                                <td align="right"><span style="color:red; display: none;" id="errMsg2"  >数字之和不是100</span></td>

                                </tbody>
                            </table>

                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub2" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault2" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>

                        </div>
                    </div>

                </div>

                <div class="col-md-6" >
                    %{--echarts--}%
                    <div id="main_2" style="width: 100%;height: 700px;"></div>
                    %{--<canvas id="doughnutChart" height="300" width="500"></canvas>--}%
                </div>
            </div>

        </div>
    </div>

    %{--自然环境--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                自然环境评分配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <th class="text-center sortable"><h3 class="text-success">评分维度</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">当前权值</h3></th>
                                    <th class="text-center sortable"><h3 class="text-success">权值修改</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form4">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr align="center">
                                        <td> 景区</td>
                                        <td> <g:formatNumber number="${result.scenicWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong4"  type="text" name="scenicWeight" id="scenicWeight" value="<g:formatNumber number="${result.scenicWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 噪音污染</td>
                                        <td> <g:formatNumber number="${result.noisePullutionWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong4" type="text" name="noisePullutionWeight" id="noisePullutionWeight" value="<g:formatNumber number="${result.noisePullutionWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>
                                    <tr align="center">
                                        <td> 空气污染</td>
                                        <td> <g:formatNumber number="${result.airPullutionWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />%</td>
                                        <td><input class="form-control liutong4" type="text" name="airPullutionWeight" id="airPullutionWeight" value="<g:formatNumber number="${result.airPullutionWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="范围0~100，小数点后1位">%</td>
                                    </tr>

                                </form>
                                <td align="right"><span style="color:red; display: none;" id="errMsg4"  >数字之和不是100</span></td>

                                </tbody>
                            </table>

                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub4" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault4" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>

                        </div>
                    </div>

                </div>

                <div class="col-md-6" >
                    %{--echarts--}%
                    <div id="main_4" style="width: 100%;height: 400px;"></div>
                    %{--<canvas id="doughnutChart" height="300" width="500"></canvas>--}%
                </div>
            </div>

        </div>
    </div>
</div>



<g:javascript>

    var numarr = []
    numarr.push($("#closingWeight").val())
    numarr.push($("#listingWeight").val())
    numarr.push($("#dealAvgDayWeight").val())
    numarr.push($("#discountrateWeight").val())
    numarr.push($("#foreclosureTimesWeight").val())
    //echarts

    var myChart_1 = echarts.init(document.getElementById('main_1'));
    app.title = '环形图';

    var option_1 = {
        tooltip: {
            trigger: 'item',
            formatter: "{b}: {c}%"
        },
        legend: {
            orient: 'horizontal',
            x: 'center',
            y: '5%',
            data:['成交率','挂牌率','成交周期','折价比例','法拍次数']
        },
        series: [
            {
                name:'访问来源',
                type:'pie',
                radius: ['40%', '65%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '30',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:[
                    {value:numarr[0], name:'成交率'},
                    {value:numarr[1], name:'挂牌率'},
                    {value:numarr[2], name:'成交周期'},
                    {value:numarr[3], name:'折价比例'},
                    {value:numarr[4], name:'法拍次数'}
                ]
            }
        ],
      //  color: ['#62CB31','#6DCF3F','#78D24D','#83D65C','#8DDA6A']
    };
    myChart_1.setOption(option_1)

    //echarts

    //流通性打分重置
    $("#ltdefault1").click(function(){
        $("#closingWeight").val("29.0")
        $("#listingWeight").val("23.0")
        $("#dealAvgDayWeight").val("19.0")
        $("#discountrateWeight").val("16.0")
        $("#foreclosureTimesWeight").val("13.0")
        var numarr = []
        numarr.push(29)
        numarr.push(23)
        numarr.push(19)
        numarr.push(16)
        numarr.push(13)
        console.log(numarr)
        option_1.series[0].data=[
            {value:numarr[0], name:'成交率'},
            {value:numarr[1], name:'挂牌率'},
            {value:numarr[2], name:'成交周期'},
            {value:numarr[3], name:'折价比例'},
            {value:numarr[4], name:'法拍次数'}
        ]
        myChart_1.setOption(option_1)
        $("#errMsg1").hide();
    })

    //分数change事件
    $(".liutong1").change(function(){
    //    console.log("in")
        var num  = 0
        var numarr = []
        $(".liutong1").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        //计算出的number保留一位小数
        num=num.toFixed(1)

        if(Number(num) != 100){
             $("#errMsg1").show();
            //swal("数字之和不是100","","error")
            return
            //alert("不是100   "+num);
        }else{
            $("#errMsg1").hide();
        }

        console.log(numarr)

        option_1.series[0].data=[
            {value:numarr[0], name:'成交率'},
            {value:numarr[1], name:'挂牌率'},
            {value:numarr[2], name:'成交周期'},
            {value:numarr[3], name:'折价比例'},
            {value:numarr[4], name:'法拍次数'}
        ]
        console.log("repaint")
        myChart_1.setOption(option_1)

    })

    //流通性提交事件
    var l = $( '#sub1').ladda();
    l.click(function(){
        var num = 0;
        $(".liutong1").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        if(Number(num) != 100){
            return
        }
        l.ladda('start');
        var data = $("#form1").serialize();
        $.ajax({
            type: "post",
            url: "/communityScoreWeight/modifyliq",
            data: data,
            success: function (data) {
                l.ladda('stop')
                location.href = location.href
            }
        });
    });

</g:javascript>
<g:javascript>

    var numarr = []
    numarr.push($("#schoolDistrictsWeight").val())
    numarr.push($("#trafficWeight").val())
    numarr.push($("#houseAgeWeight").val())
    numarr.push($("#hospitalWeight").val())
    numarr.push($("#mallWeight").val())
    numarr.push($("#afforestationWeight").val())
    numarr.push($("#ratioWeight").val())
    numarr.push($("#parkWeight").val())
    numarr.push($("#propertyFeeWeight").val())
    numarr.push($("#superMarketWeight").val())
    numarr.push($("#bankWeight").val())
    //echarts

    var myChart_2 = echarts.init(document.getElementById('main_2'));
    app.title = '环形图';

    var option_2 = {
        tooltip: {
            trigger: 'item',
            formatter: "{b}: {c}%"
        },
        legend: {
            orient: 'horizontal',
            x: 'center',
            y: '5%',
            data:['学区','交通','房龄','医院','商场','绿化率','容积率','公园','物业费','超市','银行']
        },
        series: [
            {
                name:'访问来源',
                type:'pie',
                radius: ['40%', '65%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '30',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:[//data:['学区','交通','房龄','医院','商场','绿化率','容积率','公园','物业费','超市','银行']
                    {value:numarr[0], name:'学区'},
                    {value:numarr[1], name:'交通'},
                    {value:numarr[2], name:'房龄'},
                    {value:numarr[3], name:'医院'},
                    {value:numarr[4], name:'商场'},
                    {value:numarr[5], name:'绿化率'},
                    {value:numarr[6], name:'容积率'},
                    {value:numarr[7], name:'公园'},
                    {value:numarr[8], name:'物业费'},
                    {value:numarr[9], name:'超市'},
                    {value:numarr[10], name:'银行'}
                ]
            }
        ],
        //color: ['#99CCFF','#CC6699','#FFCC00','#83D65C','#FFCC33','#FFCC99','#FFCC00','#CCCC33','#CCCC33','#CCFFCC','#CCFFFF']
    };
    myChart_2.setOption(option_2)

    //echarts

    //流通性打分重置
    $("#ltdefault2").click(function(){
        $("#schoolDistrictsWeight").val("20.4")
        $("#trafficWeight").val("16.7")
        $("#houseAgeWeight").val("13.7")
        $("#hospitalWeight").val("11.2")
        $("#mallWeight").val("9.2")
        $("#afforestationWeight").val("7.5")
        $("#ratioWeight").val("6.1")
        $("#parkWeight").val("5.0")
        $("#propertyFeeWeight").val("4.1")
        $("#superMarketWeight").val("3.4")
        $("#bankWeight").val("2.7")
        var numarr = []
        numarr.push(20.4)
        numarr.push(16.7)
        numarr.push(13.7)
        numarr.push(11.2)
        numarr.push(9.2)
        numarr.push(7.5)
        numarr.push(6.1)
        numarr.push(5.0)
        numarr.push(4.1)
        numarr.push(3.4)
        numarr.push(2.7)
        console.log(numarr)
        option_2.series[0].data=[
            {value:numarr[0], name:'学区'},
            {value:numarr[1], name:'交通'},
            {value:numarr[2], name:'房龄'},
            {value:numarr[3], name:'医院'},
            {value:numarr[4], name:'商场'},
            {value:numarr[5], name:'绿化率'},
            {value:numarr[6], name:'容积率'},
            {value:numarr[7], name:'公园'},
            {value:numarr[8], name:'物业费'},
            {value:numarr[9], name:'超市'},
            {value:numarr[10], name:'银行'}
        ]
        myChart_2.setOption(option_2)
        $("#errMsg2").hide();
    })

    //分数change事件
    $(".liutong2").change(function(){
        //    console.log("in")
        var num  = 0
        var numarr = []
        $(".liutong2").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        //计算出的number保留一位小数
        num=num.toFixed(1)

        if(Number(num) != 100){
            $("#errMsg2").show();
            //swal("数字之和不是100","","error")
            return
            //alert("不是100   "+num);
        }else{
            $("#errMsg2").hide();
        }

        console.log(numarr)

        option_2.series[0].data=[
            {value:numarr[0], name:'学区'},
            {value:numarr[1], name:'交通'},
            {value:numarr[2], name:'房龄'},
            {value:numarr[3], name:'医院'},
            {value:numarr[4], name:'商场'},
            {value:numarr[5], name:'绿化率'},
            {value:numarr[6], name:'容积率'},
            {value:numarr[7], name:'公园'},
            {value:numarr[8], name:'物业费'},
            {value:numarr[9], name:'超市'},
            {value:numarr[10], name:'银行'}
        ]
        console.log("repaint")
        myChart_2.setOption(option_2)

    })

    //流通性提交事件
    var l2 = $( '#sub2').ladda();
    l2.click(function(){
        var num = 0;
        $(".liutong2").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        if(Number(num) != 100){
            return
        }
        l2.ladda('start');
        var data = $("#form2").serialize();
        $.ajax({
            type: "post",
            url: "/communityScoreWeight/modifysur",
            data: data,
            success: function (data) {
                l2.ladda('stop')
                location.href = location.href
            }
        });
    });

</g:javascript>
<g:javascript>

    var numarr = []
    numarr.push($("#liquidityWeight").val())
    numarr.push($("#assortWeight").val())
    numarr.push($("#natureWeight").val())
    //echarts

    var myChart_3 = echarts.init(document.getElementById('main_3'));
    app.title = '环形图';

    var option_3 = {
        tooltip: {
            trigger: 'item',
            formatter: "{b}: {c}%"
        },
        legend: {
            orient: 'horizontal',
            x: 'center',
            y: '5%',
            data:['流通性评分','小区评分','自然环境评分']
        },
        series: [
            {
                name:'访问来源',
                type:'pie',
                radius: ['40%', '65%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '30',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:[
                    {value:numarr[0], name:'流通性评分'},
                    {value:numarr[1], name:'小区评分'},
                    {value:numarr[2], name:'自然环境评分'}
                ]
            }
        ],
        //color: ['#62CB31','#6DCF3F']
    };
    myChart_3.setOption(option_3)

    //echarts

    //流通性打分重置
    $("#ltdefault3").click(function(){
        $("#liquidityWeight").val("40.0")
        $("#assortWeight").val("33.0")
        $("#natureWeight").val("27.0")
        var numarr = []
        numarr.push(40)
        numarr.push(33)
        numarr.push(27)
        console.log(numarr)
        option_3.series[0].data=[
            {value:numarr[0], name:'流通性评分'},
            {value:numarr[1], name:'小区评分'},
            {value:numarr[2], name:'自然环境评分'}
        ]
        myChart_3.setOption(option_3)
        $("#errMsg3").hide();
    })

    //分数change事件
    $(".liutong3").change(function(){
        //    console.log("in")
        var num  = 0
        var numarr = []
        $(".liutong3").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        //计算出的number保留一位小数
        num=num.toFixed(1)

        if(Number(num) != 100){
            $("#errMsg3").show();
            //swal("数字之和不是100","","error")
            return
            //alert("不是100   "+num);
        }else{
            $("#errMsg3").hide();
        }
        console.log(numarr)

        option_3.series[0].data=[
            {value:numarr[0], name:'流通性评分'},
            {value:numarr[1], name:'小区评分'},
            {value:numarr[2], name:'自然环境评分'}
        ]
        console.log("repaint")
        myChart_3.setOption(option_3)

    })

    //流通性提交事件
    var l3 = $( '#sub3').ladda();
    l3.click(function(){
        var num = 0;
        $(".liutong3").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        if(Number(num) != 100){
            return
        }
        l3.ladda('start');
        var data = $("#form3").serialize();
        $.ajax({
            type: "post",
            url: "/communityScoreWeight/modifybase",
            data: data,
            success: function (data) {
                l3.ladda('stop')
                location.href = location.href
            }
        });
    });

</g:javascript>

<g:javascript>

    var numarr = []
    numarr.push($("#scenicWeight").val())
    numarr.push($("#noisePullutionWeight").val())
    numarr.push($("#airPullutionWeight").val())
    //echarts

    var myChart_4 = echarts.init(document.getElementById('main_4'));
    app.title = '环形图';

    var option_4 = {
        tooltip: {
            trigger: 'item',
            formatter: "{b}: {c}%"
        },
        legend: {
            orient: 'horizontal',
            x: 'center',
            y: '5%',
            data:['景区','噪音污染','空气污染']
        },
        series: [
            {
                name:'访问来源',
                type:'pie',
                radius: ['40%', '65%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '30',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:[
                    {value:numarr[0], name:'景区'},
                    {value:numarr[1], name:'噪音污染'},
                    {value:numarr[2], name:'空气污染'}
                ]
            }
        ],
        //color: ['#62CB31','#6DCF3F']
    };
    myChart_4.setOption(option_4)

    //echarts

    //流通性打分重置
    $("#ltdefault4").click(function(){
        $("#scenicWeight").val("40.0")
        $("#noisePullutionWeight").val("33.0")
        $("#airPullutionWeight").val("27.0")
        var numarr = []
        numarr.push(40)
        numarr.push(33)
        numarr.push(27)
        console.log(numarr)
        option_4.series[0].data=[
            {value:numarr[0], name:'景区'},
            {value:numarr[1], name:'噪音污染'},
            {value:numarr[2], name:'空气污染'}
        ]
        myChart_4.setOption(option_4)
        $("#errMsg4").hide();
    })

    //分数change事件
    $(".liutong4").change(function(){
        //    console.log("in")
        var num  = 0
        var numarr = []
        $(".liutong4").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        //计算出的number保留一位小数
        num=num.toFixed(1)

        if(Number(num) != 100){
            $("#errMsg4").show();
            //swal("数字之和不是100","","error")
            return
            //alert("不是100   "+num);
        }else{
            $("#errMsg4").hide();
        }
        console.log(numarr)

        option_4.series[0].data=[
            {value:numarr[0], name:'景区'},
            {value:numarr[1], name:'噪音污染'},
            {value:numarr[2], name:'空气污染'}
        ]
        console.log("repaint")
        myChart_4.setOption(option_4)

    })

    //流通性提交事件
    var l4 = $( '#sub4').ladda();
    l4.click(function(){
        var num = 0;
        $(".liutong4").each(function(){
            console.log($(this).val())
            $(this).val(Number($(this).val()).toFixed(1))
            num = Number(num)+Number($(this).val())
            numarr.push($(this).val())
        })
        if(Number(num) != 100){
            return
        }
        l4.ladda('start');
        var data = $("#form4").serialize();
        $.ajax({
            type: "post",
            url: "/communityScoreWeight/modifynature",
            data: data,
            success: function (data) {
                l4.ladda('stop')
                location.href = location.href
            }
        });
    });

</g:javascript>
</body>
</html>
